home *** CD-ROM | disk | FTP | other *** search
/ Champak 109 / Vol 109.iso / games / race_gam.swf / scripts / DefineSprite_102 / frame_7 / DoAction.as
Encoding:
Text File  |  2008-11-12  |  10.7 KB  |  306 lines

  1. var ┬º\x01┬º = 820;
  2. while(true)
  3. {
  4.    if(eval("\x01") == 820)
  5.    {
  6.       set("\x01",eval("\x01") - 473);
  7.       ┬º┬ºpush(true);
  8.    }
  9.    else
  10.    {
  11.       if(eval("\x01") == 393)
  12.       {
  13.          set("\x01",eval("\x01") - 330);
  14.          break;
  15.       }
  16.       if(eval("\x01") == 535)
  17.       {
  18.          set("\x01",eval("\x01") - 116);
  19.          break;
  20.       }
  21.       if(eval("\x01") == 347)
  22.       {
  23.          set("\x01",eval("\x01") + 570);
  24.          if(┬º┬ºpop())
  25.          {
  26.             set("\x01",eval("\x01") - 697);
  27.          }
  28.       }
  29.       else
  30.       {
  31.          if(eval("\x01") == 61)
  32.          {
  33.             set("\x01",eval("\x01") + 466);
  34.             break;
  35.          }
  36.          if(eval("\x01") == 542)
  37.          {
  38.             set("\x01",eval("\x01") - 481);
  39.             if(┬º┬ºpop())
  40.             {
  41.                set("\x01",eval("\x01") + 466);
  42.             }
  43.          }
  44.          else if(eval("\x01") == 527)
  45.          {
  46.             set("\x01",eval("\x01") - 315);
  47.             ┬º┬ºpush(true);
  48.          }
  49.          else if(eval("\x01") == 212)
  50.          {
  51.             set("\x01",eval("\x01") + 532);
  52.             if(┬º┬ºpop())
  53.             {
  54.                set("\x01",eval("\x01") + 70);
  55.             }
  56.          }
  57.          else if(eval("\x01") == 571)
  58.          {
  59.             set("\x01",eval("\x01") - 29);
  60.             ┬º┬ºpush(true);
  61.          }
  62.          else if(eval("\x01") == 732)
  63.          {
  64.             set("\x01",eval("\x01") - 197);
  65.             if(┬º┬ºpop())
  66.             {
  67.                set("\x01",eval("\x01") - 116);
  68.             }
  69.          }
  70.          else if(eval("\x01") == 338)
  71.          {
  72.             set("\x01",eval("\x01") + 150);
  73.             if(┬º┬ºpop())
  74.             {
  75.                set("\x01",eval("\x01") + 83);
  76.             }
  77.          }
  78.          else
  79.          {
  80.             if(eval("\x01") == 744)
  81.             {
  82.                set("\x01",eval("\x01") + 70);
  83.                break;
  84.             }
  85.             if(eval("\x01") == 419)
  86.             {
  87.                set("\x01",eval("\x01") - 81);
  88.                ┬º┬ºpush(true);
  89.             }
  90.             else
  91.             {
  92.                if(eval("\x01") == 488)
  93.                {
  94.                   set("\x01",eval("\x01") + 83);
  95.                   ┬º┬ºpush(┬º┬ºpop()());
  96.                   break;
  97.                }
  98.                if(eval("\x01") == 63)
  99.                {
  100.                   set("\x01",eval("\x01") + 669);
  101.                   ┬º┬ºpush(true);
  102.                }
  103.                else if(eval("\x01") == 987)
  104.                {
  105.                   set("\x01",eval("\x01") - 594);
  106.                   if(┬º┬ºpop())
  107.                   {
  108.                      set("\x01",eval("\x01") - 330);
  109.                   }
  110.                }
  111.                else
  112.                {
  113.                   if(eval("\x01") != 220)
  114.                   {
  115.                      if(eval("\x01") == 814)
  116.                      {
  117.                         set("\x01",eval("\x01") - 7);
  118.                         stop();
  119.                         lap_txt = "";
  120.                         jun_txt = "";
  121.                         CAR_MAX = _parent.CAR_MAX;
  122.                         spec_speed_max = [18,19,18.5,18,17,15,13,14];
  123.                         spec_speed_add = [0.5,0.5,0.55,0.6,0.55,0.55,0.5,0.45];
  124.                         spec_dakaku_max = [6,6.5,7,7.5,8,8,8,8];
  125.                         spec_dakaku_add = [1,1,1,1,1,1,1,1];
  126.                         route_max = 0;
  127.                         i = 99;
  128.                         while(i >= 0)
  129.                         {
  130.                            if(route[i] < 0)
  131.                            {
  132.                               route_max = i;
  133.                            }
  134.                            i--;
  135.                         }
  136.                         cel = new Array(celmax);
  137.                         i = 0;
  138.                         while(i < celmax)
  139.                         {
  140.                            cel[i] = 0;
  141.                            i++;
  142.                         }
  143.                         i = 0;
  144.                         while(i < route_max)
  145.                         {
  146.                            x = Math.floor(route[i] % xmax);
  147.                            y = Math.floor(route[i] / xmax);
  148.                            cel[y * xmax + x] = 1 + i;
  149.                            i++;
  150.                         }
  151.                         i = 0;
  152.                         while(i < 100)
  153.                         {
  154.                            mc = eval("mcRot.mcField.mcPiece" + i);
  155.                            r = route[i];
  156.                            if(r < 0)
  157.                            {
  158.                               mc._visible = false;
  159.                            }
  160.                            else
  161.                            {
  162.                               mc._visible = true;
  163.                               mc._x = 200 * Math.floor(r % xmax);
  164.                               mc._y = 200 * Math.floor(r / xmax);
  165.                               bef = route[route_max - 1];
  166.                               if(i > 0)
  167.                               {
  168.                                  bef = route[i - 1];
  169.                               }
  170.                               aft = route[0];
  171.                               if(i < route_max - 1)
  172.                               {
  173.                                  aft = route[i + 1];
  174.                               }
  175.                               p = 1;
  176.                               if(bef == r - xmax || aft == r - xmax)
  177.                               {
  178.                                  p += 1;
  179.                               }
  180.                               if(bef == r + 1 || aft == r + 1)
  181.                               {
  182.                                  p += 2;
  183.                               }
  184.                               if(bef == r + xmax || aft == r + xmax)
  185.                               {
  186.                                  p += 4;
  187.                               }
  188.                               if(bef == r - 1 || aft == r - 1)
  189.                               {
  190.                                  p += 8;
  191.                               }
  192.                               mc.gotoAndStop(p);
  193.                            }
  194.                            i++;
  195.                         }
  196.                         sx = route[0] % xmax;
  197.                         sy = Math.floor(route[0] / xmax);
  198.                         gx = route[route_max - 1] % xmax;
  199.                         gy = Math.floor(route[route_max - 1] / xmax);
  200.                         d = Math.atan2(sx - gx,- (sy - gy));
  201.                         k = 180 * d / 3.141593;
  202.                         mc = mcRot.mcField.mcGoal;
  203.                         mc._x = mcRot.mcField.mcPiece0._x + 100;
  204.                         mc._y = mcRot.mcField.mcPiece0._y + 100;
  205.                         mc._rotation = k;
  206.                         i = 0;
  207.                         while(i < CAR_MAX)
  208.                         {
  209.                            mc = eval("mcRot.mcField.mcCar" + i);
  210.                            mc.dest = 0;
  211.                            n = route[mc.dest];
  212.                            mc.dx = Math.floor(n % xmax) * 200 + 50 + Math.random() * 100;
  213.                            mc.dy = Math.floor(n / xmax) * 200 + 50 + Math.random() * 100;
  214.                            ax = (gx - sx) * 80;
  215.                            ay = (gy - sy) * 80;
  216.                            a = i;
  217.                            if(i == 0)
  218.                            {
  219.                               a = CAR_MAX;
  220.                            }
  221.                            a += 1;
  222.                            mc._x = sx * 200 + 100 + ax * a;
  223.                            mc._y = sy * 200 + 100 + ay * a;
  224.                            mc.gotoAndStop(1 + i);
  225.                            mc._rotation = k;
  226.                            mc.dakaku = 0;
  227.                            mc.dakaku_max = spec_dakaku_max[i];
  228.                            mc.speed = 0;
  229.                            mc.speed_max = spec_speed_max[i];
  230.                            mc.speed_add = spec_speed_add[i];
  231.                            mc.lap_cnt = 0;
  232.                            mc.hit = 0;
  233.                            mc.pos = -1;
  234.                            mc.cp = new Array(celmax);
  235.                            j = 0;
  236.                            while(j < celmax)
  237.                            {
  238.                               mc.cp[j] = 0;
  239.                               j++;
  240.                            }
  241.                            mc.cp_cnt = route_max;
  242.                            mc.run = 0;
  243.                            mc.finish_time = 0;
  244.                            i++;
  245.                         }
  246.                         mcRot._x = 200;
  247.                         mcRot._y = 200;
  248.                         mcRot._xscale = 12.5;
  249.                         mcRot._yscale = 12.5;
  250.                         x1 = 999;
  251.                         x2 = -1;
  252.                         y1 = 999;
  253.                         y2 = -1;
  254.                         i = 0;
  255.                         while(i < ymax)
  256.                         {
  257.                            j = 0;
  258.                            while(j < xmax)
  259.                            {
  260.                               if(cel[i * xmax + j] > 0)
  261.                               {
  262.                                  if(j < x1)
  263.                                  {
  264.                                     x1 = j;
  265.                                  }
  266.                                  if(j > x2)
  267.                                  {
  268.                                     x2 = j;
  269.                                  }
  270.                                  if(i < y1)
  271.                                  {
  272.                                     y1 = i;
  273.                                  }
  274.                                  if(i > y2)
  275.                                  {
  276.                                     y2 = i;
  277.                                  }
  278.                               }
  279.                               j++;
  280.                            }
  281.                            i++;
  282.                         }
  283.                         mcRot.mcField._x = -200 * (x2 + x1) / 2;
  284.                         mcRot.mcField._y = -200 * (y2 + y1) / 2;
  285.                         _parent.mcBGM.gotoAndStop("view");
  286.                         onEnterFrame = function()
  287.                         {
  288.                            mcRot._rotation += 0.5;
  289.                         };
  290.                         break;
  291.                      }
  292.                      if(eval("\x01") == 917)
  293.                      {
  294.                         set("\x01",eval("\x01") - 697);
  295.                      }
  296.                      break;
  297.                   }
  298.                   set("\x01",eval("\x01") + 767);
  299.                   ┬º┬ºpush(true);
  300.                }
  301.             }
  302.          }
  303.       }
  304.    }
  305. }
  306.